A validator is a method, or process, of a computer program that verifies whether an input string can be safely employed within security-sensitive operations, such as in conjunction with web applications on intranets and on the Internet. In this respect, a validator is distinguished from a sanitizer, which is a method of a computer program that processes an input string so that it can be safely employed within such security-sensitive operations. Validators and sanitizers are thus used to ensure that web applications are not exposed to malicious input strings that cause the web applications to perform incorrectly, such as by compromising security of the web applications and their underlying data.